Algorithm to display 1st 10 natural numbers